/*
 * INICIO CREACION DEL MENU PRINCIPAL
 */
var menuPanel = new Ext.tree.TreePanel({
			id : 'menu-panel',
			autoScroll : true,
			// tree-specific configs:
			rootVisible : false,
			lines : false,
			singleExpand : true,
			useArrows : true,

			loader : new Ext.tree.TreeLoader({
						dataUrl : '/cake/syscable/MgMenus/menuExt'
					}),

			root : {
				nodeType : 'async',
				text : 'Inicio',
				draggable : false,
				id : 'inicio'
			}
		});

// Assign the changeLayout function to be called on tree node click.
menuPanel.on('click', function(n) {
			var sn = this.selModel.selNode || {}; // selNode is null on
													// initial selection
			if (n.leaf && n.id != sn.id) { // ignore clicks on folders and
											// currently selected node
				Ext.getCmp('content-panel').layout.setActiveItem(n.id
						+ '-panel');
			}
		});
